package praktikumid.w06.p1;

public class Car extends Vehicle {

	/**
	 * @param args
	 */
	private int noOfDoors;
	
	public Car(String registrationNo, int numberOfDoors) {
		super.setRegistrationNumber(registrationNo);
		this.noOfDoors = numberOfDoors;
	}
	
	public int getNoOfDoors() {
		return this.noOfDoors;
	}
	
	public void setNoOfDoors(int d) {
		this.noOfDoors = d;
	}

	@Override
	public String toString() {
		return "regno: " + super.getRegistrationNumber() + "\nno of Doors: " + this.noOfDoors;
	}
}
